sudo: required

language: python

services:
  - docker

env:
  global:
    - DOCKER_REPO="laslabs/alpine-odoo"
    - DOCKER_TAG="latest"
    - BRANCH_PROD="master"
    - PORTS="8069:8069"
    - LINKS="db:db"
    - DAEMONIZE="1"

  matrix:
    - TESTS="1" ODOO_VERSION="10.0" BUILD_ARGS="ODOO_VERSION=10.0"
    - TESTS="1" ODOO_VERSION="9.0" BUILD_ARGS="ODOO_VERSION=9.0"
    - LINT_CHECK="1"
    - HUB="1" ODOO_VERSION="10.0" DOCKER_TAG="10.0" BUILD_ARGS="ODOO_VERSION=10.0"
    - HUB="1" ODOO_VERSION="9.0" DOCKER_TAG="9.0" BUILD_ARGS="ODOO_VERSION=9.0"

before_install:
  - docker pull kiasaki/alpine-postgres
  - docker run -d -e POSTGRES_USER="odoo" -e POSTGRES_PASSWORD="odoo" --name="db" kiasaki/alpine-postgres

install:
  - git clone --depth=1 https://github.com/LasLabs/docker-quality-tools.git ${HOME}/docker-quality-tools
  - export PATH=${HOME}/docker-quality-tools/travis:${PATH}
  - travis_install_all

script:
  - travis_run_all

after_success:
  - travis_after_success_all
